<html>
<head><meta charset="utf-8"><title>non-recursive ensure_answer · wg-traits · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/index.html">wg-traits</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html">non-recursive ensure_answer</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="180432636"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180432636" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180432636">(Nov 11 2019 at 15:31)</a>:</h4>
<p>Hi <span class="user-mention" data-user-id="116009">@nikomatsakis</span></p>



<a name="180432651"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180432651" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180432651">(Nov 11 2019 at 15:31)</a>:</h4>
<p>I'm assuming you saw my new PR?</p>



<a name="180432664"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180432664" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180432664">(Nov 11 2019 at 15:31)</a>:</h4>
<p>(even if you haven't actually looked at the changes)</p>



<a name="180433180"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180433180" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180433180">(Nov 11 2019 at 15:36)</a>:</h4>
<p>Since the <code>CanonicalStrand</code> changes might be less straightforward (or at least, more to think about) than I/we originally thought, I'll probably rebase that branch for master</p>



<a name="180433325"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180433325" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180433325">(Nov 11 2019 at 15:38)</a>:</h4>
<p>But, overall I think there are some good changes there (not just that it's now iterative instead of recursive). But also I think it might make implementing the coinduction changes <em>easier</em> (or at least easier to follow)</p>



<a name="180433344"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180433344" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180433344">(Nov 11 2019 at 15:38)</a>:</h4>
<p>Would like your input though</p>



<a name="180446598"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180446598" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180446598">(Nov 11 2019 at 18:18)</a>:</h4>
<p><span class="user-mention" data-user-id="232957">@Jack Huey</span> I saw the PR, but I didn't look closely at the commits</p>



<a name="180446618"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180446618" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180446618">(Nov 11 2019 at 18:18)</a>:</h4>
<p>I guess that it is removing all recursion and just maintaining the stack manually?</p>



<a name="180446822"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180446822" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180446822">(Nov 11 2019 at 18:21)</a>:</h4>
<p>Yes, exactly</p>



<a name="180446870"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180446870" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180446870">(Nov 11 2019 at 18:21)</a>:</h4>
<p>The stack was somewhat maintained manually already, I just extended upon that</p>



<a name="180447087"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180447087" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180447087">(Nov 11 2019 at 18:24)</a>:</h4>
<p>Reading that PR, I see what I think is a bug -- but a pre-existing one</p>



<a name="180447094"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180447094" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180447094">(Nov 11 2019 at 18:24)</a>:</h4>
<p>I have to go back to the source, but</p>



<a name="180447099"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180447099" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180447099">(Nov 11 2019 at 18:24)</a>:</h4>
<p>it looks like when a strand returns QuantumExceeded -- oh, never mind</p>



<a name="180447111"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180447111" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180447111">(Nov 11 2019 at 18:25)</a>:</h4>
<p>I was going to say "It never gets added back to the table"</p>



<a name="180447126"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180447126" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180447126">(Nov 11 2019 at 18:25)</a>:</h4>
<p>but I guess that it does at the point where we return <code>QuantumExceeded</code></p>



<a name="180447261"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180447261" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180447261">(Nov 11 2019 at 18:26)</a>:</h4>
<p>Yeah, so that's one thing that I think changing to iterative vs recursive really helps with, is that it's sometimes more clear what's happening to strands and where</p>



<a name="180448237"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180448237" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180448237">(Nov 11 2019 at 18:40)</a>:</h4>
<p>My intention initially was basically.... you pass ownership of strands around, so if you don't get one back, you don't have to worry about it</p>



<a name="180448245"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180448245" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180448245">(Nov 11 2019 at 18:40)</a>:</h4>
<p>I just kind of didn't trust myself I guess :)</p>



<a name="180448277"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180448277" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180448277">(Nov 11 2019 at 18:41)</a>:</h4>
<p>This is a fair point</p>



<a name="180448409"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180448409" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180448409">(Nov 11 2019 at 18:43)</a>:</h4>
<p>I think that worked fine when <em>everything</em> is recursive. But once you start doing things iteratively, it because a little bit more messy</p>



<a name="180448429"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180448429" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180448429">(Nov 11 2019 at 18:43)</a>:</h4>
<p>I guess you could pass it in, and then an <code>Option&lt;Strand&gt;</code> out</p>



<a name="180449819"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180449819" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180449819">(Nov 11 2019 at 19:00)</a>:</h4>
<p>Well, I can't argue that it's a bit messy, since I got a bit confused</p>



<a name="180449828"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180449828" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180449828">(Nov 11 2019 at 19:00)</a>:</h4>
<p>I don't think you need an <code>Option&lt;Strand&gt;</code>, though</p>



<a name="180449836"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180449836" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180449836">(Nov 11 2019 at 19:00)</a>:</h4>
<p>I mean, we have an existing enum</p>



<a name="180449863"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180449863" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180449863">(Nov 11 2019 at 19:01)</a>:</h4>
<p>Oh but I guess you mean when you move to a fully iterative approach</p>



<a name="180449871"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180449871" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180449871">(Nov 11 2019 at 19:01)</a>:</h4>
<p>yes</p>



<a name="180453853"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180453853" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180453853">(Nov 11 2019 at 19:45)</a>:</h4>
<p>ps <span class="user-mention" data-user-id="232957">@Jack Huey</span> one thing I do think is that we should try to land pieces of this branch, I'm finding this coinductive stuff hard enough to think about without mixing in more than we have to</p>



<a name="180454546"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180454546" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180454546">(Nov 11 2019 at 19:53)</a>:</h4>
<p>So, I can try to split apart this branch</p>



<a name="180454611"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180454611" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180454611">(Nov 11 2019 at 19:54)</a>:</h4>
<p>I initially tried to make smaller commits</p>



<a name="180454637"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180454637" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180454637">(Nov 11 2019 at 19:54)</a>:</h4>
<p>But the change from recursive -&gt; iterative all sort of came at once</p>



<a name="180454648"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180454648" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180454648">(Nov 11 2019 at 19:54)</a>:</h4>
<p>I guess with hindsight it might be easier</p>



<a name="180454692"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180454692" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180454692">(Nov 11 2019 at 19:55)</a>:</h4>
<p>I saw some commits that seemed separable</p>



<a name="180454702"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180454702" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180454702">(Nov 11 2019 at 19:55)</a>:</h4>
<p>it's not the most imp't thing, just thinking that it make sense to land certain commits quickly, ponder the rest :)</p>



<a name="180454704"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180454704" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180454704">(Nov 11 2019 at 19:55)</a>:</h4>
<p>The first ~5 or so are</p>



<a name="180454769"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180454769" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180454769">(Nov 11 2019 at 19:56)</a>:</h4>
<p>I don't think I would want to land the change to cyclic handling <em>quite</em> yet -- even though I think this is probably good</p>



<a name="180454774"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180454774" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180454774">(Nov 11 2019 at 19:56)</a>:</h4>
<p>I was thinking already we should get rid of that vector</p>



<a name="180454788"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180454788" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180454788">(Nov 11 2019 at 19:56)</a>:</h4>
<p>I was intending though to use the position in the queue</p>



<a name="180454804"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180454804" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180454804">(Nov 11 2019 at 19:56)</a>:</h4>
<p>I hadn't really thought it through very hard</p>



<a name="180454820"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180454820" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180454820">(Nov 11 2019 at 19:57)</a>:</h4>
<p>basically partition the vector so you have "cyclic stuff" collected in one part, "candidates" in another</p>



<a name="180454840"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180454840" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180454840">(Nov 11 2019 at 19:57)</a>:</h4>
<p>but using the "answer found counter" seems maybe nicer and more obvious</p>



<a name="180454940"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180454940" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180454940">(Nov 11 2019 at 19:58)</a>:</h4>
<p>I can split out the first couple commits if you think it's worth just landing those</p>



<a name="180454963"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180454963" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180454963">(Nov 11 2019 at 19:58)</a>:</h4>
<p>That's sort of what I had intended to start with</p>



<a name="180455145"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180455145" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180455145">(Nov 11 2019 at 20:00)</a>:</h4>
<p>am I correct that the "work" counter is really tracking <em>answers</em></p>



<a name="180455208"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180455208" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180455208">(Nov 11 2019 at 20:01)</a>:</h4>
<p>That wasn't what I had intended it to be. I had originally intended it to match exactly how collecting into a vec worked</p>



<a name="180455222"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180455222" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180455222">(Nov 11 2019 at 20:01)</a>:</h4>
<p>But I think tracking answers works also</p>



<a name="180455244"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180455244" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180455244">(Nov 11 2019 at 20:01)</a>:</h4>
<p>I think this is the sort of..intention</p>



<a name="180455309"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180455309" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180455309">(Nov 11 2019 at 20:02)</a>:</h4>
<p>if we incremented it for every answer that is published anywhere</p>



<a name="180455316"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180455316" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180455316">(Nov 11 2019 at 20:02)</a>:</h4>
<p>and then, if there is a cycle, we tag the strand with the number of answers so far</p>



<a name="180455336"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180455336" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180455336">(Nov 11 2019 at 20:02)</a>:</h4>
<p>well, I have to go think about it again :)</p>



<a name="180455355"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180455355" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180455355">(Nov 11 2019 at 20:03)</a>:</h4>
<p>I want in particular to see if we can do a bit better than the current code</p>



<a name="180455360"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180455360" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180455360">(Nov 11 2019 at 20:03)</a>:</h4>
<p>No problem</p>



<a name="180455373"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180455373" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180455373">(Nov 11 2019 at 20:03)</a>:</h4>
<p>right now, the current code -- if quantum is exceeded -- will put the cycles back into circulation</p>



<a name="180455379"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180455379" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180455379">(Nov 11 2019 at 20:03)</a>:</h4>
<p>but it seems like we should be able to avoid that if we were tracking answers published</p>



<a name="180455406"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180455406" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180455406">(Nov 11 2019 at 20:04)</a>:</h4>
<p>but it's a bit tricky</p>



<a name="180455454"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180455454" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180455454">(Nov 11 2019 at 20:04)</a>:</h4>
<p>after all, the next time you are invoked, the stack above you is different</p>



<a name="180455462"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180455462" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180455462">(Nov 11 2019 at 20:04)</a>:</h4>
<p>so maybe I am wrong -- unless we have a way to check if that has changed</p>



<a name="180455464"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180455464" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180455464">(Nov 11 2019 at 20:04)</a>:</h4>
<p>Right</p>



<a name="180455477"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180455477" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180455477">(Nov 11 2019 at 20:04)</a>:</h4>
<p>So I'm not sure if you still assume they are cycles</p>



<a name="180455481"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180455481" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180455481">(Nov 11 2019 at 20:04)</a>:</h4>
<p>yeah, you can't really</p>



<a name="180455493"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180455493" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180455493">(Nov 11 2019 at 20:04)</a>:</h4>
<p>regardless we need a nice comment :)</p>



<a name="180455509"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180455509" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180455509">(Nov 11 2019 at 20:05)</a>:</h4>
<p>I think I did make a comment about that somewhere</p>



<a name="180455523"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180455523" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180455523">(Nov 11 2019 at 20:05)</a>:</h4>
<p>I think maybe your original branch has it right. I might want to rename it to "clock" from "work"</p>



<a name="180455529"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180455529" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180455529">(Nov 11 2019 at 20:05)</a>:</h4>
<p>because for some reason that feels more obvious to me</p>



<a name="180455579"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180455579" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180455579">(Nov 11 2019 at 20:06)</a>:</h4>
<p>but basically the goal is to say "this was found to be a cycle in some previous call"</p>



<a name="180455587"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180455587" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180455587">(Nov 11 2019 at 20:06)</a>:</h4>
<p>and nothing more than that</p>



<a name="180455589"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180455589" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180455589">(Nov 11 2019 at 20:06)</a>:</h4>
<p>"clock" works</p>



<a name="180455771"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180455771" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180455771">(Nov 11 2019 at 20:08)</a>:</h4>
<p>Ha, yeah I did make a comment. It just didn't make it in when I refactored the branch: <a href="https://github.com/jackh726/chalk/blob/fuel_friendly_old/chalk-engine/src/logic.rs#L293" target="_blank" title="https://github.com/jackh726/chalk/blob/fuel_friendly_old/chalk-engine/src/logic.rs#L293">https://github.com/jackh726/chalk/blob/fuel_friendly_old/chalk-engine/src/logic.rs#L293</a></p>



<a name="180455796"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180455796" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180455796">(Nov 11 2019 at 20:09)</a>:</h4>
<p>Though I didn't explicitly say it was because of cycles above us</p>



<a name="180455818"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180455818" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180455818">(Nov 11 2019 at 20:09)</a>:</h4>
<p>Anyway, I'll make a comment and change the name.</p>



<a name="180456048"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180456048" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180456048">(Nov 11 2019 at 20:12)</a>:</h4>
<p>I am reminded of the clock we use for floundering</p>



<a name="180456058"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180456058" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180456058">(Nov 11 2019 at 20:13)</a>:</h4>
<p>I sort of forget how that works</p>



<a name="180456082"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180456082" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180456082">(Nov 11 2019 at 20:13)</a>:</h4>
<p>So that does track answers</p>



<a name="180456090"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180456090" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180456090">(Nov 11 2019 at 20:13)</a>:</h4>
<p>ah, but it is local to a strand</p>



<a name="180456108"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180456108" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180456108">(Nov 11 2019 at 20:13)</a>:</h4>
<p>yes</p>



<a name="180456112"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180456112" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180456112">(Nov 11 2019 at 20:13)</a>:</h4>
<p>you might want to use the same <code>TimeStamp</code> type for the clock (if you didn't already)</p>



<a name="180456115"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180456115" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180456115">(Nov 11 2019 at 20:13)</a>:</h4>
<p>I did :)</p>



<a name="180456117"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180456117" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180456117">(Nov 11 2019 at 20:13)</a>:</h4>
<p>ok :)</p>



<a name="180479076"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180479076" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180479076">(Nov 12 2019 at 03:45)</a>:</h4>
<p>OK <span class="user-mention" data-user-id="116009">@nikomatsakis</span></p>
<ul>
<li>I moved some code from <code>ensure_answer</code> into separate functions (feel free to bikeshed the names).</li>
<li>I merged <code>dfn</code> and <code>work</code> into a new <code>clock</code>, which is just a <code>TimeStamp</code> still. I added some comments about when it gets incremented. With this, we also no longer need <code>DepthFirstNumber</code>, is was essentially the same as <code>TimeStamp</code> anyways. (I guess it loses it's parity with the paper, but I think overall it's cleaner)</li>
<li>I added some comments specifically regarding the positive cycles and the clock.</li>
</ul>



<a name="180479314"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/non-recursive%20ensure_answer/near/180479314" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/non-recursive.20ensure_answer.html#180479314">(Nov 12 2019 at 03:50)</a>:</h4>
<p>I'm going to let you look it over a bit more before I do any work to split out the smaller changes into a separate PR.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>